package br.com.datasun.biblioteca.ui;

import java.awt.BorderLayout;
import java.awt.Dimension;

import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JLabel;
import javax.swing.SwingConstants;
import java.awt.Font;
import images.ImageLoader;
import java.awt.GridBagLayout;

public class CadastroModelo extends JPanel {
	private JPanel jpNorte = new JPanel();
	private JPanel jpTabela = new JPanel();
	private JPanel jpBotoes = new JPanel();
	private JPanel jpDados = new JPanel();
	
	private JButton jbLimpar = new JButton();
	private JButton jbNovo = new JButton();
	private JButton jbCancelar = new JButton();
	private JButton jbGravar = new JButton();
	
	private JLabel jlTituloCadastro = new JLabel("Cadastro de Autores");
	

	/**
	 * Create the panel.
	 */
	public CadastroModelo() {
		setLayout(new BorderLayout(0,0));
		jpNorte.setPreferredSize(new Dimension(621,200));
		add(jpNorte,BorderLayout.NORTH);
		jpNorte.setLayout(new BorderLayout(0,0));
				
		jlTituloCadastro.setFont(new Font("Tahoma", Font.BOLD, 11));
		jlTituloCadastro.setHorizontalAlignment(SwingConstants.CENTER);
		jpNorte.add(jlTituloCadastro, BorderLayout.NORTH);
		
		jpBotoes.setPreferredSize(new Dimension(621,35));
		jpNorte.add(jpBotoes,BorderLayout.SOUTH);
		
		Dimension tamanhoBotoes = new Dimension(115,25);
		jbLimpar.setPreferredSize(tamanhoBotoes);
		jbNovo.setPreferredSize(tamanhoBotoes);
		jbCancelar.setPreferredSize(tamanhoBotoes);
		jbGravar.setPreferredSize(tamanhoBotoes);
		
		jbLimpar.setIcon(ImageLoader.createImageIcon("btnLimpar115x25.png"));
		jbNovo.setIcon(ImageLoader.createImageIcon("btnNovo115x25.png"));
		jbCancelar.setIcon(ImageLoader.createImageIcon("btnCancelar115x25.png"));
		jbGravar.setIcon(ImageLoader.createImageIcon("btnSalvar115x25.png"));
		
		jpBotoes.add(jbLimpar);
		jpBotoes.add(jbNovo);
		jpBotoes.add(jbCancelar);
		jpBotoes.add(jbGravar);
		
		jpNorte.add(jpDados,BorderLayout.CENTER);
		add(jpTabela,BorderLayout.CENTER);
		GridBagLayout gbl_jpDados = new GridBagLayout();
		gbl_jpDados.columnWidths = new int[]{0};
		gbl_jpDados.rowHeights = new int[]{0};
		gbl_jpDados.columnWeights = new double[]{Double.MIN_VALUE};
		gbl_jpDados.rowWeights = new double[]{Double.MIN_VALUE};
		jpDados.setLayout(gbl_jpDados);
		

	}

}
